﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace TimeToGo.Configuration
{
    internal class TimeInfoConfigurationCollection : ConfigurationElementCollection 
    {
        protected override ConfigurationElement CreateNewElement()
        {
            return new TimeInfoConfigurationElement();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((TimeInfoConfigurationElement)element).Name;
        }

        public void Add(TimeInfoConfigurationElement element)
        {
            this.BaseAdd(element);
        }

        public void Remove(string key)
        {
            this.BaseRemove(key);
        }

        public void Clear()
        {
            this.BaseClear();
        }

        public TimeInfoConfigurationElement this[int index]
        {
            get { return (TimeInfoConfigurationElement)this[index]; }
        }
    }
}
